# -*- coding: utf-8 -*-
"""
Created on Thu Dec 03 14:07:34 2015

@author: liliangrong
"""
import time
start = time.clock()


import urllib
import re
url = "http://python.jobbole.com/83486/"
resp = urllib.urlopen(url)
page = resp.read()
#print page

pattern = re.compile('<section id="content">(.*?)</section>',re.S)
c = re.search(pattern,page).group()
#print c
#print dir(c)

p1 = re.compile('<li>(.*?)</li>')
r = re.findall(p1,c)
for item in r:
    print item

p2 = re.compile('<p>(.*?)</p>')
r1 = re.findall(p2,c)
for i in r1:
    print i

end = time.clock()
print "-----------run time is %f s--------------" % (end-start)
